<script setup lang="ts">
import { Upload } from '@element-plus/icons-vue'
import type { TableColumnCtx } from 'element-plus'

interface User {
  date: string
  name: string
  address: string
}

const formatter = (row: User, column: TableColumnCtx<User>) => {
  return row.address
}

const tableData: User[] = [
  {
    date: '3号楼',
    name: '3203',
    address: '张三',
  },
  {
    date: '3号楼',
    name: '3204',
    address: '李四',
  },
  {
    date: '3号楼',
    name: '3205',
    address: '王五',
  },
  {
    date: '3号楼',
    name: '3206',
    address: '王二麻子',
  },
]
</script>

<template>
  <div style="position: absolute;top: 100px;width: 90%;height: 40px;border-bottom: solid 1px rgb(221.7, 222.6, 224.4);margin: auto">
    <el-row>
      <el-col :span="8">
<!--        <el-button style="border: solid 1px #4285F4;border-radius: 20px;width: 150px;color: #4285F4;background-color:rgb(216.8, 235.6, 255);">-->
<!--          上传题库<el-icon class="el-icon&#45;&#45;right"><Upload /></el-icon>-->
<!--        </el-button>-->
        <div class="grid-content ep-bg-purple" />
      </el-col>
      <el-col :span="8">
        <div class="grid-content ep-bg-purple-light" />
      </el-col>
      <el-col :span="8">
        <el-input
            style="width: 200px;padding-left: 5px;border-radius: 20px ;margin-right: 5px"
            placeholder="请输入名称"
        />
        <el-input
            style="width: 200px;padding-left: 5px;border-radius: 20px ;margin-right: 5px"
            placeholder="类型"
        />
        <el-button style="border: solid 1px #4285F4;border-radius: 20px;width: 20px;color: #4285F4;background-color:rgb(216.8, 235.6, 255);">
          <el-icon class="el-icon--right"><el-icon><Search /></el-icon></el-icon>
        </el-button>
        <div class="grid-content ep-bg-purple" />
      </el-col>
    </el-row>


  </div>
  <div style="height: 88%;background-color:red;width: 100%;margin-top: 80px">
    <el-table
        :data="tableData"
        :default-sort="{ prop: 'date', order: 'descending' }"
        style="width: 100%;height: 100%"
    >
      <el-table-column prop="date" label="楼号"  width="180" />
      <el-table-column prop="name" label="位置" width="180" />
      <el-table-column prop="address" label="监考教师" width="180" />
      <el-table-column prop="name" label="学生" width="180" />
      <el-table-column fixed="right" label="操作" min-width="120">
        <template #default="scope">
          <el-button
              link
              size="small"
              style="color: #4285F4"
              @click=""
          >
            分配监考老师
          </el-button>
          <el-button
              link
              size="small"
              style="color: #4285F4"
              @click=""
          >
            分配学生
          </el-button>

        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<style scoped>

</style>